package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface OrderInfoService extends IService<OrderInfo> {


    /**
     * 订单确认
     * @param tradeVo
     * @return
     */
    Object trade(TradeVo tradeVo);

    /**
     * 查询用户购买的声音
     * @param trackId
     * @return
     */
    List<OrderInfo> getTrackOrderInfo(Long trackId);

    Map<String, Object> getUserTrackOrderInfo(Long userId);

    /**
     * 订单提交
     * @param orderInfoVo
     * @return
     */
    Object submitOrder(OrderInfoVo orderInfoVo);

    void cancelOrder(String orderNo);

    Page findUserPage(Page<OrderInfo> orderInfoPage);

    OrderInfo getOrderInfo(String orderNo);

    /**
     * 订单支付，支付渠道，订单号
     * @param payway
     * @param orderNo
     * @return
     */
    Object getOrderPayInfo(String payway, String orderNo);

}
